import React, { useState } from 'react';
import { Button, Modal } from 'antd';
import AccountPassword from './accountPassword';

const ForgetPassword: React.FC = () => {
  const [open, setOpen] = useState(false);

  const showModal = () => {
    setOpen(true);
  };

  const handleOk = () => {
    setOpen(false);
  };

  const handleCancel = () => {
    setOpen(false);
  };

  return (
    <>
      <Button type="primary" onClick={showModal}>
        忘记密码？
      </Button>
      <Modal
        title="Title"
        open={open}
        onOk={handleOk}
        onCancel={handleCancel}
      >
        <AccountPassword></AccountPassword>
      </Modal>
    </>
  );
};

export default ForgetPassword;
